/**
 * Licensee: DuKe TeAm
 * License Type: Purchased
 */
package ormsamples;

import org.orm.*;
public class DeletePruebaPDS1Data {
	public void deleteTestData() throws PersistentException {
		PersistentTransaction t = orm.PruebaPDS1PersistentManager.instance().getSession().beginTransaction();
		try {
			orm.DAOFactory lDAOFactory = orm.DAOFactory.getDAOFactory();
			orm.dao.Tda_tipoGasolinaDAO lormTda_tipoGasolinaDAO = lDAOFactory.getTda_tipoGasolinaDAO();
			orm.Tda_tipoGasolina lormTda_tipoGasolina = lormTda_tipoGasolinaDAO.loadTda_tipoGasolinaByQuery(null, null);
			// Delete the persistent object
			lormTda_tipoGasolinaDAO.delete(lormTda_tipoGasolina);
			orm.dao.Tdp_precioDAO lormTdp_precioDAO = lDAOFactory.getTdp_precioDAO();
			orm.Tdp_precio lormTdp_precio = lormTdp_precioDAO.loadTdp_precioByQuery(null, null);
			// Delete the persistent object
			lormTdp_precioDAO.delete(lormTdp_precio);
			orm.dao.Tcl_logDAO lormTcl_logDAO = lDAOFactory.getTcl_logDAO();
			orm.Tcl_log lormTcl_log = lormTcl_logDAO.loadTcl_logByQuery(null, null);
			// Delete the persistent object
			lormTcl_logDAO.delete(lormTcl_log);
			t.commit();
		}
		catch (Exception e) {
			t.rollback();
		}
		
	}
	
	public static void main(String[] args) {
		try {
			DeletePruebaPDS1Data deletePruebaPDS1Data = new DeletePruebaPDS1Data();
			try {
				deletePruebaPDS1Data.deleteTestData();
			}
			finally {
				orm.PruebaPDS1PersistentManager.instance().disposePersistentManager();
			}
		}
		catch (Exception e) {
			e.printStackTrace();
		}
	}
}
